Dynomotion

Group: DynoMotion Message: 11388 From: jojodillinger Date: 4/15/2015
Subject: 4-axis simulataneous milling
Hello!

I have a 4-axis (X,Y,Z and A, where A is parallel to Y in my case..) milling machine with stepper motors. I use a Kflop and Kstep combination and run GCODE with KMotionCNC.

I have some questions concerning certain topics and would like to post one after the other in this thread..

First question is concerning feedrate. I generate the 4-axis simultaneous GCODE myself, and it looks something like this (millimeters and degrees):

...
...
G1  X  -27.303  Y   12.384  Z   10.156  A   21.720  F485
G1  X  -27.536  Y   12.405  Z   10.247  A   21.910  F485
G1  X  -27.767  Y   12.426  Z   10.339  A   22.101  F485
G1  X  -27.999  Y   12.447  Z   10.432  A   22.292  F485
G1  X  -28.230  Y   12.468  Z   10.525  A   22.482  F485
G1  X  -28.461  Y   12.489  Z   10.620  A   22.673  F485
G1  X  -25.653  Y   12.511  Z   11.724  A   25.007  F4295
G1  X  -21.765  Y   12.532  Z   12.987  A   28.058  F5347
G1  X  -17.815  Y   12.553  Z   14.042  A   31.110  F5347
G1  X  -13.814  Y   12.574  Z   14.884  A   34.162  F5347
G1  X   -9.774  Y   12.595  Z   15.513  A   37.213  F5347

...

...


This code belongs to a setup, where the rotation axis of A is placed at xyz = (0,0,-75mm).


In order to obtain a constant feedrate in the material I want to mill at the tool tip, I specify a feedrate in every line. As you can see, when the A-axis starts to rotate considerably, I have to considerbly increase the feedrate in order to maintain nearly constant velocity in the material.


If I understand correctly, KMotionCNC calculates feedrate purely on the xyz-movement (in the trajectory planner I set the "Radius" for the A-axis to zero). Maximum feedrates my machine can handle are

x: 4000 mm/min (2.6247 in/sec)

y: 4000 mm/min (2.6247 in/sec)

z: 2000 mm/min (1.3127 in/sec)


I specified those parameters in the trajectory planner.


Here my question:) Does KMotionCNC automatically limit the feedrate according to the max. specified in the trajectory planner? If so, the feedrates >4000 specified in GCODE should not be reached when running the code. However, the machines chokes when reaching the part of the GCODE with F>5000...


Thank you already in advance!


Johannes










Group: DynoMotion Message: 11390 From: Tom Kerekes Date: 4/15/2015
Subject: Re: 4-axis simulataneous milling
Hi Johannes,

I think everything you say is correct, except that each individual axis max velocity should be honored but that may result in a combined axes feedrate greater than any one axis.  For example if x and y are both going 4000mm/min then the combined feedrate will be 1.41 x 4000 = 5657 mm/min.

What Version are you running?

Which axis "chokes"?

Can you make a small GCode fragment that demonstrates the problem?

You might run a KFLOP Program similar to C:\KMotion433k\C Programs\CaptureXYZMotionToFile.c to capture the final trajectory to see what is happening.

Regards
TK

Group: DynoMotion Message: 11396 From: jojodillinger Date: 4/15/2015
Subject: Re: 4-axis simulataneous milling
Hello Tom,

thanks for clarification. Apparently (and as usual) I guess it was my mistake..

I must have messed up some velocity settings between kmotion and kmotioncnc. Thats why I now made a little excel table (attached) to calculate the required stepper input for kmotion and kmotioncnc. Maybe it can be helpful for someone to generate the required input.

Anyhow, now that I introduced the correct maximum velocities for jogging,motion,...no axis stalling anymore. kmotion limits the feedrate in case the one specified in the gcode surpasses one (or more) of the allowed velocities of x,y or z.

One more question about this: in the trajectory planner I specify a velocity for the A-axis (30deg/sec in my case). Based on the x,y,z movement in a G01 a time dt is required. I guess kmotioncnc also increases dt in case the max. deg/sec (30deg/sec..) in a move is exceeded? Sorry if this is a too obvious thing to ask..:)

Kind regards,

Johannes
  @@attachment@@
Group: DynoMotion Message: 11398 From: Tom Kerekes Date: 4/15/2015
Subject: Re: 4-axis simulataneous milling [1 Attachment]
Hi Johannes,

Thanks for the spreadsheet.

Yes if any axis moves (or accelerates) at a rate beyond its capabilities the trajectory planner will scale down all the axes proportionally to keep all axes within their constraints.

Regards
TK

Group: DynoMotion Message: 11418 From: jojodillinger Date: 4/16/2015
Subject: Re: 4-axis simulataneous milling
Hi Tom,

great, thanks a lot!

Just out of curiosity, is there a way to modify the gcode viewer such that the A axis is parallel to Y, and with a rotation center at a certain location? Its not really necessary, but maybe there is a way.
Kind regards,

Johannes





---In DynoMotion@yahoogroups.com, <tk@...> wrote :

Hi Johannes,

Thanks for the spreadsheet.

Yes if any axis moves (or accelerates) at a rate beyond its capabilities the trajectory planner will scale down all the axes proportionally to keep all axes within their constraints.

Regards
TK



Group: DynoMotion Message: 11419 From: Tom Kerekes Date: 4/16/2015
Subject: Re: 4-axis simulataneous milling
Hi Johannes,

The A Axis rotation is about the X axis , the B Axis rotation is about the Y Axis, and the C Axis rotation is about the Z Axis.  So if you change to use the B axis it may work for you.

Regards
TK

Group: DynoMotion Message: 11421 From: jojodillinger Date: 4/17/2015
Subject: Re: 4-axis simulataneous milling
Hi Tom,

I guess then I have to initialize the system with the following change in the C-program?

currently:
DefineCoordSystem(0,1,2,3);
change to:
DefineCoordSystem6(0,1,2,-1,3,-1,-1)

I just figured that the the visualization in G Code Viewer uses the
radius specified in the trajectory planner. This one I have to set to
zero, since I dont mill on a cylinder, but on an irregular shape (so I
have to calculate the feedrate myself, rather than using "Radius" in
tracectory planner).
So in this case I guess there is no way to
correctly visualize the path. Also would have to tell the viewer how the
 zero direction of the rotational axis is defined (in my case: vector
pointing upwards is zero degree). Anyhow, visualization is not that
important, and everything else working fine right now:)

Ah, one more weird question: backlash amount and rate should both be positive, right? I once specified it negative and the behavior was quite weird..

Kind regards,

Johannes







---In DynoMotion@yahoogroups.com, <tk@...> wrote :

Hi Johannes,

The A Axis rotation is about the X axis , the B Axis rotation is about the Y Axis, and the C Axis rotation is about the Z Axis.  So if you change to use the B axis it may work for you.

Regards
TK

Group: DynoMotion Message: 11422 From: Tom Kerekes Date: 4/17/2015
Subject: Re: 4-axis simulataneous milling
Hi Johannes,

Sorry I can't think of aneasy way to get the visualization.

Yes the backlash and rate should both be positive.

Regards
TK

Group: DynoMotion Message: 11426 From: jojodillinger Date: 4/17/2015
Subject: Re: 4-axis simulataneous milling
Hi Tom,

no problem, its not really necessary. Everything else working really nicely:)
Kind regards,

Johannes




---In DynoMotion@yahoogroups.com, <tk@...> wrote :

Hi Johannes,

Sorry I can't think of aneasy way to get the visualization.

Yes the backlash and rate should both be positive.

Regards
TK

Group: DynoMotion Message: 11450 From: jojodillinger Date: 5/3/2015
Subject: Re: 4-axis simulataneous milling
Hello,
everything working really nicely so far!

I have another question..
Is it possible to add a button in KmotionCNC that executes the following GCode, which positions the G54 coordinate system at a certain location?

G10 L2 P1 X 99.7558 Y 36.0586 Z 156.6

I want to do this after homing the axis. I could of course copy-paste this line the KmotionCNC main window, but it would be much easier, safer, if I could use a button..

Can I do this with some little C-program maybe?

Thanks!
Regards,

Johannes
Group: DynoMotion Message: 11453 From: Tom Kerekes Date: 5/3/2015
Subject: Re: 4-axis simulataneous milling
Hi Johannes,

Wouldn't be simpler to just set those values into the Fixture Offset Table and then save it?

But you can also execute such a line of GCode from a User Button.  Create a file with that line of code fol,lowed by M30 with an *.ngc file extension to indicate to KMotionCNC it is GCode.   Then configure the User Button with "Execute Prog" action type.

HTH
Regards
TK

Group: DynoMotion Message: 11454 From: jojodillinger Date: 5/3/2015
Subject: Re: 4-axis simulataneous milling
Hi Tom,
thanks for the quick response!
I thought that the fixture offset table is emptied (zero everywhere) every time I start up KmotionCNC, or at least when I home the axis. I dont have access to the machine right now, but will try the saving option, which for sure would be the easiest way.
Thanks also for the button-solution, will also try this one and see which one in the end is more convenient!
Kind regards,
Johannes



---In DynoMotion@yahoogroups.com, <tk@...> wrote :

Hi Johannes,

Wouldn't be simpler to just set those values into the Fixture Offset Table and then save it?

But you can also execute such a line of GCode from a User Button.  Create a file with that line of code fol,lowed by M30 with an *.ngc file extension to indicate to KMotionCNC it is GCode.   Then configure the User Button with "Execute Prog" action type.

HTH
Regards
TK